//hard link
#include <ulib.h>
#include <stdio.h>
#include <dir.h>

#define printf(...)						fprintf(1, __VA_ARGS__)

void
usage(void) {
	printf("Usage: ln old new\n");
}

int
main(int argc, char** argv) {
	if (argc != 3) {
		usage();
		return -1;
	}
	else {
		if (link(argv[1], argv[2]) < 0) {
			printf("link %s %s: failed\n", argv[1], argv[2]);
			return -1;
		}
	}
	return 0;
}
